From 61fac8b0b1304b2f9d61274cce4bb02bc1e3bcdd Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 17 Apr 2010 23:37:42 -0700 Subject: [PATCH] Support DEB_BUILD_OPTIONS parallel=N. --- debian/changelog | 4 +++- debian/rules | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8731d5623fa..11951507f4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ emacs23 (23.1+1-7) unstable; urgency=low * Remove Jerome from debian/control Uploaders since he has retired. (closes: #573442) - -- Rob Browning Sat, 17 Apr 2010 19:38:45 -0700 + * Support DEB_BUILD_OPTIONS parallel=N. + + -- Rob Browning Sat, 17 Apr 2010 23:37:04 -0700 emacs23 (23.1+1-6) unstable; urgency=low diff --git a/debian/rules b/debian/rules index cceafdff704..9f6f68c7fae 100755 --- a/debian/rules +++ b/debian/rules @@ -183,6 +183,11 @@ else # not noopt endif # neq (m68k,$(DEB_HOST_ARCH)) endif # not noopt +joblimit := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +ifeq (,$(joblimit)) + joblimit := 1 +endif + target := $(DEB_HOST_GNU_TYPE) movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail @@ -301,9 +306,9 @@ define checkdir endef define build_cmd - $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" # If we don't use bootstrap, we need to explicitly build info. - $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info + $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info endef # If we ever need to do the stripping outside of dh_strip, just add an -- 2.30.2